package pers.cj.pdos.constant;

/**
 * 单号编号类型
 * 注意，请不要更改type
 */
public enum GoodsAttrName {
    BRAND("品牌", 1),
    COLOR("颜色", 2),
    CUSTOM1("自定义属性1", 3),
    CUSTOM2("自定义属性2", 4),
    CUSTOM3("自定义属性3", 5),
    ;
    // 成员变量
    private String name;
    private int type;

    // 构造方法
    GoodsAttrName(String name, int type) {
        this.name = name;
        this.type = type;
    }
    // 普通方法
    public static GoodsAttrName getObj(int type) {
        for (GoodsAttrName attrName : GoodsAttrName.values()) {
            if (attrName.getType() == type) {
                return attrName;
            }
        }
        return null;
    }

    // get set 方法
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public int getType() {
        return type;
    }
    public void setType(int type) {
        this.type = type;
    }

}
